module type_casting_err1;

typedef enum { red, blue, green, yellow, white, black } colour;
colour c, d;
int i;

initial
begin
   $display( "Default value of c is %d", c);
   $display( "Default value of d is %d", d);
   
//   i = c + 2 ;
//   $display("i: %d", i);
   
   d = c + 1 ;   // compilation error; since colour data type c is added with integer 1
                 // An enum variable may only be assigned to same enum typed variable or one of its values
//   d = colour'(c+1) ;

   $display( "Changed value of c is %d", c);
   $display( "Changed value of d is %d", d);

end

endmodule